﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo1
{
    struct PersonStruct
    {
        public string Name;
        public int Phone;
        public string Site;
    }
    enum Indent
    {
        新订单, 已发货, 已签收, 已评价
    }
    enum Fruit 
    {
        哈密瓜, 西瓜, 苹果, 香蕉, 奇异果, 草莓, 葡萄  
    }
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("1 枚举作业 2 结构体作业");
            int a = int.Parse(Console.ReadLine());
            switch (a)
            {
                case 1:
                    Console.WriteLine("1 订单 2 切水果 3 RPG游戏");
                    int h = int.Parse(Console.ReadLine());
                    switch (h)
                    {
                        case 1:
                            Indent q = Indent.新订单;
                            Indent w = Indent.已发货;
                            Indent e = Indent.已签收;
                            Indent r = Indent.已评价;
                            int q1 = (int)Indent.新订单;
                            int w1 = (int)Indent.已发货;
                            int e1 = (int)Indent.已签收;
                            int r1 = (int)Indent.已评价;
                            Console.WriteLine(q + "  " + q1);
                            Console.WriteLine(w + "  " + w1);
                            Console.WriteLine(e + "  " + e1);
                            Console.WriteLine(r + "  " + r1);
                            Console.ReadKey();
                            break;
                        case 2:
                            //B、然后定义一个输出水果分数的方法，参数类型就是这个水果枚举，方法中根据不同的枚举值，输出水果对应的分数（可以参考切水果游戏）。注：水果形状越小，切到的时候分数就越高。
                            Fruit SS = Fruit.哈密瓜;
                            Fruit QQ = Fruit.西瓜;
                            Fruit WW = Fruit.苹果;
                            Fruit EE = Fruit.香蕉;
                            Fruit RR = Fruit.奇异果;
                            Fruit TT = Fruit.草莓;
                            Fruit YY = Fruit.葡萄;
                            int SS1 = (int)Fruit.哈密瓜;
                            int QQ1 = (int)Fruit.西瓜;
                            int WW1 = (int)Fruit.苹果;
                            int EE1 = (int)Fruit.香蕉;
                            int RR1 = (int)Fruit.奇异果;
                            int TT1 = (int)Fruit.草莓;
                            int YY1 = (int)Fruit.葡萄;
                            Console.WriteLine(SS+"="+(SS1+10)+"  "+ QQ + "=" + (QQ1 * 100) + "  " + WW + "=" + (WW1 * 100) + "  " + EE + "=" + (EE1 * 100) + "  " + RR + "=" + (RR1 * 100) + "  " + TT + "=" + (TT1 * 100) + "  " + YY + "=" + (YY1 * 100));
                            Console.ReadKey();
                            break;
                        case 3:
                            break;
                    }
                    break;
                case 2:
                    Console.WriteLine("1 PersonStruct 2 PersonClass");
                    int g = int.Parse(Console.ReadLine());
                    switch (g)
                    {
                        case 1:
                            PersonStruct p1 = new PersonStruct();
                            p1.Name = "张三";
                            p1.Phone = 10086;
                            p1.Site = "北京市二环";

                            PersonStruct p2 = new PersonStruct();
                            p2.Name = "李四";
                            p2.Phone = 10086;
                            p2.Site = "北京市二环";
                            Console.WriteLine(p1.Name+"--"+p1.Phone+"--"+p1.Site);
                            Console.ReadKey();
                            break;
                        case 2:
                            PersonClass p3 = new PersonClass();
                            p3.Name = "王五";
                            p3.Phone = 10086;
                            p3.Site = "龙岩市新罗区";

                            PersonClass p4 = new PersonClass();
                            p4.Name = "朱六";
                            p4.Phone = 10086;
                            p4.Site = "龙岩市新罗区";
                            Console.WriteLine(p3.Name + "--" + p3.Phone + "--" + p3.Site);
                            Console.ReadKey();
                            break;
                    }
                    break;
            }
        }
    }
}
